<?php
/**后台路由接口配置类*/
$router = app('admin.router');
/**首页*/
$router->get('/', 'HomeController@index');
/**分类列表接口*/
$router->resource('testing/category', CategoryController::class);
/**系统配置列表接口*/
$router->resource('testing/config', TestingConfigController::class);
/**单个测评详情接口*/
$router->resource('testing/detail', TestingDetailController::class);
/**测评题目列表接口*/
$router->resource('testing/items/', TestingDetailItemsController::class);
/**用户答题记录列表接口*/
$router->resource('testing/user/record', UserRecordController::class);
/**结果类型列表接口*/
$router->resource('testing/result/type', TestingResultTypeController::class);
/**结果属性列表接口*/
$router->resource('testing/result/attribute', TestingResultAttributeController::class);
/**推荐产品列表接口*/
$router->resource('testing/recommend/product', TestingRecommendProductController::class);
/**开发者管理*/
$router->resource('testing/dev/url', TestingDevUrlController::class);
/**推荐产品列表接口*/
$router->resource('testing/dev/info', TestingDeveloperController::class);
/**用户*/
$router->resource('testing/wechat/user', WechatUserController::class);
/**21减重测评*/
$router->resource('testing/decrease/weight', DecreaseWeightController::class);
/**结果参数配置*/
$router->resource('testing/param/config', ParamConfigController::class);
/**开发者链接管理*/
$router->resource('testing/developer/link', DeveloperLinkController::class);



/**测评列表选项接口*/
$router->get('testing/detail/options', 'TestingDetailController@getOptions');
/**测评详情对应的题目列表接口*/
$router->get('testing/detail/item/{id}', 'TestingDetailItemsController@singleTesting');
$router->get('testing/detail/{id}/upload/questions/', 'TestingDetailController@uploadQuestions');
/**保存excel题目接口*/
$router->get('testing/detail/upload/questions/save', 'TestingDetailController@saveUploadQuestion');
/**分类列表接口*/
$router->get('cate/options', 'CategoryController@getCateOptions');
/**excel导入测评题目接口*/
$router->get('testing/question/import/tid/{tid}/key/{key}', 'TestingDetailController@importQuetionDataFromExcel');
/**结果属性选项接口*/
$router->get('testing/result/attribute/options', 'TestingResultAttributeController@options');
/**结果类型接口*/
$router->get('testing/result/type/options', 'TestingResultTypeController@options');
/**获取文件路劲接口*/
$router->get('testing/get/path', 'ExampleController@getPath');
/**自动生成crud的操作接口*/
$router->get('generate/crud', 'GenerateController@index');
/**自动生成crud的操作接口*/
$router->get('test', 'ExampleController@test');
/**测评答题详情*/
$router->get('testing/answers/info/{id}/{tid}', 'UserRecordController@info');

/**21天清澈用户答题记录列表接口1*/
$router->get('testing/decrease/info/{id}/{tid}', 'DecreaseWeightController@info');
//s轻测数据图表化
$router->resource('testing/decrease/echarts', DecreaseEchartsController::class);
/**轻体测评根据时间范围查找数据**/
$router->post('testing/decrease/echarts/show', 'DecreaseEchartsController@indexShow');
/**21天清澈用户答题记录列表接口2*/
$router->get('testing/decrease/middleinfo/{id}/{tid}', 'DecreaseWeightController@middleinfo');
/**减脂平台1.0*/
//$router->any('testing/decrease/user/info/{id}/{uid}/{tid}/{appid}/{time?}', 'DecreaseUserInfoController@index');
/**打卡统计*/
$router->any('testing/decrease/user/stats/{appid}/{time?}', 'DecreaseUserInfoController@dataStats');
/**用户统计打卡详情*/
$router->any('/testing/decrease/users/{appid}/{type}/{time}', 'DecreaseUserInfoController@statsInfo');
/**用户周期管理时间轴*/
$router->any('/testing/decrease/users/timeline/{uid}', 'DecreaseUserInfoController@timeLine');
/**用户添加备注*/
$router->any('/testing/decrease/users/remark', 'DecreaseUserInfoController@remark');
/**存储用户添加备注*/
$router->any('/testing/decrease/users/storeremark', 'DecreaseUserInfoController@storeRemark');



/**减脂v2.0*/
/**城市列表*/
$router->get('/api/china-area/city', 'DecreaseSelectController@city');
/**区域列表*/
$router->get('/api/china-area/district', 'DecreaseSelectController@district');
/**匹配用户筛选首页*/
$router->any('/testing/decrease/select/index', 'DecreaseSelectController@index');
/**删除订单*/
$router->any('/testing/decrease/delete/order/{appid}/{oid}', 'DecreaseSelectController@deleteOrder');
/**手动添加用户首页*/
$router->any('/testing/decrease/add/index', 'DecreaseSelectController@addIndex');
/**手动添加用户*/
$router->any('/testing/decrease/add/order', 'DecreaseSelectController@addOrder');
/**上传文档首页*/
$router->any('/testing/decrease/upload/index', 'DecreaseSelectController@uploadIndex');
/**上传文档*/
$router->any('/testing/decrease/upload/order', 'DecreaseSelectController@uploadOrder');
/**订单列表*/
$router->any('/testing/decrease/order/index', 'DecreaseSelectController@orderIndex');
/**订单详情*/
$router->any('/testing/decrease/order/info', 'DecreaseSelectController@orderInfo');
/**匹配用户首页*/
$router->any('/testing/decrease/match/index/{appid}/{oid}/{tid}', 'DecreaseSelectController@matchIndex');
/**匹配用户*/
$router->any('/testing/decrease/match/order', 'DecreaseSelectController@matchOrder');
/**手动匹配首页*/
$router->any('/testing/decrease/people/match', 'DecreaseSelectController@peopleMatchIndex');
/*下载导入订单标准格式excel*/
$router->get('/testing/decrease/order/download', 'DecreaseSelectController@download');
/**减脂平台2.0版本首页*/
$router->any('testing/decrease/user/info/{id}/{uid}/{tid}/{appid}/{time?}', 'DecreaseUserInfoController@index');
/**减脂平台营养师管理*/
$router->resource('testing/decrease/nutritionist', DecreaseNutritionistController::class);

/**结果类型接口*/
$router->get('testing/user/options', 'WechatUserController@options');
/**太保测评接口*/
$router->get('testing/tb', 'TbCheckController@checkTb');
/**清除缓存接口*/
$router->get('cache/clear', 'ToolsController@clearCache');

$router->get('testing/recipe/import/config', 'ParamConfigController@importRecipeTestingConfig');


/**
 * 新健保
 */
$router->resource('testing/xjb/answers',TestingXjbAnswersController::class);
$router->get('testing/xjb/answersInfo/{id}/{tid}', 'TestingXjbAnswersController@info');

/**
 *中英测评导出结果
 * admin/testing/recipe/export/24/2017-03-09 2010:26:52/2017-03-10 2015:08:59
 */
$router->get('testing/recipe/export/{tid}/{start?}/{end?}', 'UserRecordController@exportRecipeTestingData');

/**
 *根据tid导出用户年龄区间统计表$type存在表示导出已过滤数据
 * admin/testing/dw/export/agegrades/19
 * admin/testing/dw/export/agegrades/21
 */
$router->get('testing/dw/export/agegrades/{tid}/{type?}', 'UserRecordController@exportDwAgeData');

$router->get('testing/developer/rel/import/data', 'ExampleController@initDeveloperTestingRel');


$router->get('partner/testing/add', 'ExampleController@batchInsertPartnerTesting');

//渠道管理
$router->resource('testing/channel', ChannelController::class);